Skip to content

feat(integrations): add OMP client support - #1109

Draft
n3wr1ch wants to merge 4 commits into
lidge-jun:devfrom
n3wr1ch:feat/omp-integration
Draft

feat(integrations): add OMP client support#1109
n3wr1ch wants to merge 4 commits into
lidge-jun:devfrom
n3wr1ch:feat/omp-integration

Conversation

@n3wr1ch

@n3wr1ch n3wr1ch commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add OMP as a first-class file integration backed by ~/.omp/agent/models.yml
  • export the complete routed opencodex catalog in OMP's YAML provider schema, including non-GPT models and capability metadata
  • expose OMP in the GUI dashboard, management API, CLI help, localized copy, and integration documentation
  • keep OMP loopback-only and serialize only the existing non-secret opencodex-loopback placeholder

Dependency

The prerequisite Pi visibility fix has landed on dev via #1151. This branch is now rebased onto current dev; the inherited #1085 commits and the broader export-policy changes that were not part of OMP have been removed.

Overlap

#1109 was opened first and intentionally remained draft while the Pi prerequisite was unresolved. #1140 now overlaps the same OMP integration. This update keeps #1109 focused on its original OMP contract so the maintainers can review the implementations without the former stacked diff.

Security review

This adds a credential destination and requires explicit maintainer security review. No user or provider secret is serialized: OMP receives the non-secret opencodex-loopback placeholder, and integration writes remain restricted to loopback proxy binds. Upstream provider credentials stay in opencodex's own configuration.

Verification

Verified on head 13702704 rebased onto dev at 3e60b1d9:

  • bun run typecheck
  • focused client integration/export suites — 124 pass, 0 fail
  • bun run test — 9,660 pass, 8 skip, 1 unrelated timing-sensitive failure in native-profile-drain-server.test.ts; the complete three-test file passes when rerun alone
  • bun run privacy:scan
  • cd gui && bun test tests — 670 pass, 0 fail
  • bun run lint:gui
  • cd gui && bun run lint:i18n
  • bun run build:gui
  • cd docs-site && bun run build
  • real OMP catalog load from the original implementation: omp models opencodex --json recognized routed GPT, Claude, and Grok models

Screenshot

The GUI exposes OMP as its own integration tab and reports the generated models.yml destination and restart guidance.

OMP integration tab

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults; explicit maintainer security review is requested above.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features
    • Added OMP as a supported integration with a dedicated GUI tab and localized labels.
    • Added OMP configuration export with YAML output, profile-aware paths, and loopback placeholders instead of real credentials.
    • Expanded client configuration API and CLI support to seven file-based integrations.
  • UI Improvements
    • Renamed “Copy JSON” actions to clearer configuration-focused wording and added copy-failure messaging.
  • Documentation
    • Updated multilingual CLI, API, and integration documentation with OMP support and credential guidance.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds OMP as a supported file integration and export client. It adds profile-aware paths, YAML serialization, loopback credentials, GUI routing, localized labels, API coverage, tests, and documentation updates.

Changes

OMP integration

Layer / File(s) Summary
OMP export paths and serialization
src/clients/config-export.ts, src/integrations/registry.ts, src/cli/*, tests/client-config-export*, tests/cli-export-command.test.ts
Adds OMP profile validation, path resolution, YAML export, loopback credentials, registry wiring, and export tests.
Integration registry and management response
src/integrations/registry.ts, tests/integrations-*, tests/management-client-config-route.test.ts
Registers OMP paths and validates OMP metadata, YAML content, model data, and placeholder credentials.
GUI routing, client lists, and localized labels
gui/src/app-routing.ts, gui/src/components/*, gui/src/pages/*, gui/src/i18n/*, gui/tests/*
Adds the OMP integration tab, file-client support, translated labels and restart semantics, and updated configuration copy terminology.
CLI, API, and integration documentation
docs-site/src/content/docs/guides/integrations.md, docs-site/src/content/docs/*/reference/cli/agents.md, docs-site/src/content/docs/*/reference/management-api.md
Documents OMP exports, destinations, environment overrides, loopback placeholders, supported clients, and generalized client-configuration responses.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding first-class OMP client support across the integration, CLI, GUI, API, and documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • review readiness checklist open (2/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 2/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

2/4 boxes ticked.

This PR stays in draft until every box above is ticked.

@n3wr1ch
n3wr1ch force-pushed the feat/omp-integration branch from ca9183d to 6860b6c Compare August 7, 2026 04:04
@github-actions
github-actions Bot marked this pull request as ready for review August 7, 2026 04:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs-site/src/content/docs/ja/reference/cli/agents.md (1)

136-148: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update the localized CLI output contract.

Both pages list seven clients in the command heading but still restrict the --client flag to opencode|pi. Both pages also state that --json produces JSON, although OMP, Hermes, and Gajae produce YAML, OpenClaw produces JSON5, and Kimi produces TOML.

  • docs-site/src/content/docs/ja/reference/cli/agents.md#L136-L148: List all seven client IDs. Replace JSON-only output wording with generated configuration bytes.
  • docs-site/src/content/docs/ko/reference/cli/agents.md#L142-L154: List all seven client IDs. Replace JSON-only output wording with generated configuration bytes.

As per path instructions, translated locale pages must not contradict the English source.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/src/content/docs/ja/reference/cli/agents.md` around lines 136 -
148, Update the CLI documentation in
docs-site/src/content/docs/ja/reference/cli/agents.md lines 136-148 and
docs-site/src/content/docs/ko/reference/cli/agents.md lines 142-154: change the
--client option to list all seven supported client IDs, and revise --json
wording to describe generated configuration bytes rather than JSON-only output,
matching the English source and accounting for each client’s format.

Source: Path instructions

docs-site/src/content/docs/ru/reference/cli/agents.md (1)

155-193: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

The localized CLI references retain the same client-list and output-format drift.

Both pages add OMP to the heading and examples but leave the client option and destination tables incomplete. Both also describe --json as JSON-only even though OMP emits YAML.

  • docs-site/src/content/docs/ru/reference/cli/agents.md#L155-L193: Update Line 167, add the four omitted client rows, and describe --json as native-format output.
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md#L129-L155: Update Line 137, add the four omitted client rows, and describe --json as native-format output.

As per path instructions, localized documentation must stay consistent with actual CLI and API behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/src/content/docs/ru/reference/cli/agents.md` around lines 155 -
193, Update docs-site/src/content/docs/ru/reference/cli/agents.md lines 155-193
and docs-site/src/content/docs/zh-cn/reference/cli/agents.md lines 129-155
consistently: revise the client option description to include all supported
clients, add the four missing client rows to each destination table, and
describe --json as native-format output so OMP’s YAML is covered rather than
claiming JSON-only output.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/src/content/docs/guides/integrations.md`:
- Around line 19-22: Update docs-site/src/content/docs/guides/integrations.md
lines 19-22 to include PI_PROFILE and document ompAgentDir() precedence:
OMP_PROFILE overrides PI_PROFILE; with an active profile, PI_CODING_AGENT_DIR is
ignored and PI_CONFIG_DIR supplies the profile root; without a profile,
PI_CODING_AGENT_DIR takes precedence. Apply the same precedence rule in
docs-site/src/content/docs/reference/cli/agents.md line 180, replacing the flat
variable list.

In `@tests/management-client-config-route.test.ts`:
- Around line 162-176: Extend the OMP test around clientConfigApi and
PiGeneratedConfig to assert the complete routed model catalog: a/m1, a/m2, and
b/no-context. Also verify the exported models preserve their capability and
reasoning metadata, including the expected modelContextWindows values, while
retaining the existing provider and API key assertions.
- Around line 162-176: Update the OMP test around clientConfigApi and the
body.config assertions to verify that neither body.text nor the serialized
body.config contains REAL_LOOKING_KEY. Keep the existing provider model and
placeholder API-key assertions unchanged.

---

Outside diff comments:
In `@docs-site/src/content/docs/ja/reference/cli/agents.md`:
- Around line 136-148: Update the CLI documentation in
docs-site/src/content/docs/ja/reference/cli/agents.md lines 136-148 and
docs-site/src/content/docs/ko/reference/cli/agents.md lines 142-154: change the
--client option to list all seven supported client IDs, and revise --json
wording to describe generated configuration bytes rather than JSON-only output,
matching the English source and accounting for each client’s format.

In `@docs-site/src/content/docs/ru/reference/cli/agents.md`:
- Around line 155-193: Update
docs-site/src/content/docs/ru/reference/cli/agents.md lines 155-193 and
docs-site/src/content/docs/zh-cn/reference/cli/agents.md lines 129-155
consistently: revise the client option description to include all supported
clients, add the four missing client rows to each destination table, and
describe --json as native-format output so OMP’s YAML is covered rather than
claiming JSON-only output.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cfc8af1a-b446-49d9-b51a-426e76c08cf9

📥 Commits

Reviewing files that changed from the base of the PR and between 1fc24f0 and 6860b6c.

⛔ Files ignored due to path filters (1)
  • devlog/_plan/260806_omp_integration/evidence/omp-dashboard.png is excluded by !**/*.png
📒 Files selected for processing (35)
  • docs-site/src/content/docs/guides/integrations.md
  • docs-site/src/content/docs/ja/reference/cli/agents.md
  • docs-site/src/content/docs/ja/reference/management-api.md
  • docs-site/src/content/docs/ko/reference/cli/agents.md
  • docs-site/src/content/docs/ko/reference/management-api.md
  • docs-site/src/content/docs/reference/cli/agents.md
  • docs-site/src/content/docs/reference/management-api.md
  • docs-site/src/content/docs/ru/reference/cli/agents.md
  • docs-site/src/content/docs/ru/reference/management-api.md
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md
  • docs-site/src/content/docs/zh-cn/reference/management-api.md
  • gui/src/app-routing.ts
  • gui/src/components/apikeys-workspace/client-config-clients.ts
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/Integrations.tsx
  • gui/src/pages/integrations/FileIntegrationPage.tsx
  • gui/src/pages/integrations/integration-api.ts
  • gui/src/pages/integrations/overview-clients.ts
  • gui/tests/client-config-panel.test.tsx
  • gui/tests/integrations-overview-rows.test.ts
  • src/cli/export-command.ts
  • src/cli/help.ts
  • src/clients/config-export.ts
  • src/integrations/registry.ts
  • tests/cli-export-command.test.ts
  • tests/client-config-export-new-clients.test.ts
  • tests/client-config-export.test.ts
  • tests/integrations-invariants.test.ts
  • tests/integrations-state.test.ts
  • tests/management-client-config-route.test.ts

Comment thread docs-site/src/content/docs/guides/integrations.md Outdated
Comment thread tests/management-client-config-route.test.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6860b6c4ac

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/clients/config-export.ts Outdated
Comment thread docs-site/src/content/docs/reference/cli/agents.md Outdated
Comment thread src/clients/config-export.ts Outdated
@github-actions
github-actions Bot marked this pull request as draft August 7, 2026 04:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/src/content/docs/ja/reference/cli/agents.md`:
- Line 154: Synchronize the OMP destination metadata rows in
docs-site/src/content/docs/ja/reference/cli/agents.md:154-154,
docs-site/src/content/docs/ko/reference/cli/agents.md:160-160,
docs-site/src/content/docs/ru/reference/cli/agents.md:187-187, and
docs-site/src/content/docs/zh-cn/reference/cli/agents.md:155-155: mark
~/.omp/agent/models.yml as the default path, document OMP_PROFILE/PI_PROFILE
precedence, and replace the generic placeholder with the literal
opencodex-loopback value in each localized table.
- Around line 141-144: Update the localized export-output descriptions to
reflect that non-JSON output is generated client configuration or the selected
native format, rather than always JSON. In
docs-site/src/content/docs/ja/reference/cli/agents.md lines 141-144, revise the
adjacent Line 148 wording; apply the equivalent correction in
docs-site/src/content/docs/ko/reference/cli/agents.md lines 147-150 for Line
154, docs-site/src/content/docs/ru/reference/cli/agents.md lines 172-175 for
Lines 179-181, and docs-site/src/content/docs/zh-cn/reference/cli/agents.md
lines 142-145 for Line 149.

In `@tests/client-config-export.test.ts`:
- Around line 479-488: Make the test around EXPORT_CLIENTS.omp.destination
deterministic by isolating homedir() or mocking the filesystem check used by
ompModelsConfigPath, so the real test account cannot affect the selected
filename. Preserve separate assertions covering both canonical models.yml and
legacy models.yaml resolution.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cc38f932-0454-4ec6-a12e-105f1d85597c

📥 Commits

Reviewing files that changed from the base of the PR and between 6860b6c and e35bc9b.

📒 Files selected for processing (10)
  • docs-site/src/content/docs/guides/integrations.md
  • docs-site/src/content/docs/ja/reference/cli/agents.md
  • docs-site/src/content/docs/ko/reference/cli/agents.md
  • docs-site/src/content/docs/reference/cli/agents.md
  • docs-site/src/content/docs/ru/reference/cli/agents.md
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md
  • src/cli/export-command.ts
  • src/cli/help.ts
  • src/clients/config-export.ts
  • tests/client-config-export.test.ts

Comment thread docs-site/src/content/docs/ja/reference/cli/agents.md
Comment thread docs-site/src/content/docs/ja/reference/cli/agents.md Outdated
Comment thread tests/client-config-export.test.ts Outdated
@n3wr1ch
n3wr1ch force-pushed the feat/omp-integration branch from e35bc9b to 1370270 Compare August 7, 2026 12:18
@n3wr1ch
n3wr1ch marked this pull request as ready for review August 7, 2026 13:32
@github-actions
github-actions Bot marked this pull request as draft August 7, 2026 13:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1370270476

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +83 to 84
**Pi, OMP, Kimi Code and Gajae Code only work against a loopback bind.** None of their config
schemas has a place for the `x-opencodex-api-key` header that a non-loopback bind

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the claim that OMP cannot carry admission headers

When a user wants to configure OMP for a non-loopback proxy manually, this paragraph incorrectly says OMP's schema has nowhere to put x-opencodex-api-key, contradicting lines 22–23, which now acknowledge provider-level header support. Fresh evidence in the current head is that the earlier limitation was narrowed to the generated integration, but this older blanket statement remains; split OMP from the schema-limited clients and state only that opencodex's initial generated OMP integration defers remote credential wiring.

AGENTS.md reference: docs-site/AGENTS.md:L7-L10

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs-site/src/content/docs/guides/integrations.md (1)

83-88: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not state that OMP has no header slot.

OMP supports provider-level headers. This integration still does not emit remote x-opencodex-api-key wiring, so it remains loopback-only. Split OMP from clients whose schemas have no header field, and document the deferred remote-header limitation instead.

As per path instructions, OMP documentation must distinguish provider-adapter header behavior from client export and preserve the loopback-only limitation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/src/content/docs/guides/integrations.md` around lines 83 - 88, The
integration guidance should distinguish OMP from Pi, Kimi Code, and Gajae Code:
do not claim OMP lacks a header slot. Update the OMP-specific wording to
acknowledge provider-level headers while stating that this integration does not
emit remote x-opencodex-api-key wiring, so OMP remains loopback-only; keep the
no-header-schema explanation only for the other clients.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs-site/src/content/docs/ja/reference/cli/agents.md`:
- Around line 128-130: Update the localized CLI introductions to describe the
actual native serialization contract: the selected client’s native format
contains a credential reference or the opencodex-loopback placeholder, as
applicable, rather than always an environment reference. Apply this wording to
docs-site/src/content/docs/ja/reference/cli/agents.md lines 128-130,
docs-site/src/content/docs/ko/reference/cli/agents.md lines 134-136, and
docs-site/src/content/docs/zh-cn/reference/cli/agents.md lines 129-131; update
docs-site/src/content/docs/ru/reference/cli/agents.md line 155 to mention native
format and loopback placeholders.

In `@src/clients/config-export.ts`:
- Around line 1006-1019: Update the filename value in EXPORT_CLIENTS.omp to
"models.yml" so downloaded OMP configurations match the canonical path selected
by ompModelsConfigPath. Keep the existing destination and loopback-only behavior
unchanged.

---

Outside diff comments:
In `@docs-site/src/content/docs/guides/integrations.md`:
- Around line 83-88: The integration guidance should distinguish OMP from Pi,
Kimi Code, and Gajae Code: do not claim OMP lacks a header slot. Update the
OMP-specific wording to acknowledge provider-level headers while stating that
this integration does not emit remote x-opencodex-api-key wiring, so OMP remains
loopback-only; keep the no-header-schema explanation only for the other clients.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6b424375-3b85-44de-9851-84c63c7452d4

📥 Commits

Reviewing files that changed from the base of the PR and between e35bc9b and 1370270.

📒 Files selected for processing (16)
  • docs-site/src/content/docs/guides/integrations.md
  • docs-site/src/content/docs/ja/reference/cli/agents.md
  • docs-site/src/content/docs/ko/reference/cli/agents.md
  • docs-site/src/content/docs/reference/cli/agents.md
  • docs-site/src/content/docs/ru/reference/cli/agents.md
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md
  • gui/src/app-routing.ts
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/zh.ts
  • src/clients/config-export.ts
  • tests/client-config-export.test.ts
  • tests/management-client-config-route.test.ts

Comment on lines +128 to 130
### `ocx export --client <opencode|pi|omp|hermes|openclaw|kimi|gajae>`

実行中のプロキシに接続されているクライアント設定を出力します。 opencode と [円周率](/guides/pi/) は環境変数ではなく独自の JSON 設定からプロバイダーを読み取るため、このコマンドは `opencodex` プロバイダー ブロック (ベース URL、モデル リスト、クライアントの環境参照) をシリアル化し、そのファイルにマージできるようにします。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the actual credential and serialization contract in every localized introduction.

The expanded client lists include OMP, but each localized introduction describes the serialized value as an environment reference. The CLI emits the selected client’s native format, and OMP and Pi use the literal opencodex-loopback placeholder instead of an environment reference.

  • docs-site/src/content/docs/ja/reference/cli/agents.md#L128-L130: Replace the generic environment-reference wording with “credential reference or loopback placeholder” and mention native format.
  • docs-site/src/content/docs/ko/reference/cli/agents.md#L134-L136: Replace the generic environment-reference wording with “credential reference or loopback placeholder” and mention native format.
  • docs-site/src/content/docs/ru/reference/cli/agents.md#L155-L155: Update the adjacent introduction to cover native format and loopback placeholders.
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md#L129-L131: Replace the generic environment-reference wording with “credential reference or loopback placeholder” and mention native format.

As per path instructions, localized documentation must stay synchronized with actual CLI behavior.

📍 Affects 4 files
  • docs-site/src/content/docs/ja/reference/cli/agents.md#L128-L130 (this comment)
  • docs-site/src/content/docs/ko/reference/cli/agents.md#L134-L136
  • docs-site/src/content/docs/ru/reference/cli/agents.md#L155-L155
  • docs-site/src/content/docs/zh-cn/reference/cli/agents.md#L129-L131
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs-site/src/content/docs/ja/reference/cli/agents.md` around lines 128 -
130, Update the localized CLI introductions to describe the actual native
serialization contract: the selected client’s native format contains a
credential reference or the opencodex-loopback placeholder, as applicable,
rather than always an environment reference. Apply this wording to
docs-site/src/content/docs/ja/reference/cli/agents.md lines 128-130,
docs-site/src/content/docs/ko/reference/cli/agents.md lines 134-136, and
docs-site/src/content/docs/zh-cn/reference/cli/agents.md lines 129-131; update
docs-site/src/content/docs/ru/reference/cli/agents.md line 155 to mention native
format and loopback placeholders.

Source: Path instructions

Comment on lines +1006 to +1019
omp: {
id: "omp",
filename: "omp-models.yaml",
destination: env => ompModelsConfigPath(env),
apiKeyEnv: "",
exportHint: "OMP reads a non-secret placeholder from models.yml; loopback needs no key.",
build: buildPiClientConfig,
format: "yaml",
summarize: summarizePi,
buildContribution: buildOmpContribution,
// OMP supports provider-level headers, but remote credential wiring is
// intentionally deferred from this initial loopback-only integration.
loopbackOnly: true,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether other export clients keep filename in sync with their destination basename,
# and whether an invariant test enforces this for all clients including omp.
set -euo pipefail

echo "--- EXPORT_CLIENTS entries (filename/destination pairs) ---"
rg -n -A6 '^\s*(opencode|pi|hermes|openclaw|kimi|gajae|omp):\s*\{' src/clients/config-export.ts

echo "--- Invariant test coverage ---"
fd -a 'integrations-invariants.test.ts' | xargs -r rg -n -C5 'filename|destination'

Repository: lidge-jun/opencodex

Length of output: 2324


🏁 Script executed:

#!/bin/bash
# Inspect the relevant config exports paths and the ExportClientSpec interface around filename/destination.
set -euo pipefail

echo "--- config-export outline candidates ---"
fd -a 'config-export.ts|integrations-invariants.test.ts' .

echo "--- src/clients/config-export.ts relevant definitions ---"
rg -n -A10 -B10 'function ompModelsConfigPath|const ompModelsConfigPath|export type ExportClientSpec|filename:' src/clients/config-export.ts

echo "--- destination path implementations ---"
rg -n -A12 'function (opencodeGlobalConfigPath|piGlobalConfigPath|ompModelsConfigPath|hermesConfigPath|openclawConfigPath|kimiConfigPath|gajaeConfigPath)|const (opencodeGlobalConfigPath|piGlobalConfigPath|ompModelsConfigPath|hermesConfigPath|openclawConfigPath|kimiConfigPath|gajaeConfigPath)' src/clients/config-export.ts

echo "--- test files mentioning exports/clients/filenames ---"
git ls-files | rg 'test|spec|integration|config|client' | sed -n '1,160p'

echo "--- focused invariant search ---"
rg -n -C4 'ExportClientSpec|filename|destination|matched|invariant|download filename|matches the destination' tests src || true

Repository: lidge-jun/opencodex

Length of output: 50376


🏁 Script executed:

#!/bin/bash
# Read only the specific relevant file regions with limited line ranges.
set -euo pipefail

echo "--- config-export.ts OMP/client blocks ---"
sed -n '880,1085p' src/clients/config-export.ts

echo "--- config-export.ts path definitions ---"
rg -n -A9 -B2 'function (opencodeGlobalConfigPath|piGlobalConfigPath|ompModelsConfigPath|hermesConfigPath|openclawConfigPath|kimiConfigPath|gajaeConfigPath)|const (opencodeGlobalConfigPath|piGlobalConfigPath|ompModelsConfigPath|hermesConfigPath|openclawConfigPath|kimiConfigPath|gajaeConfigPath)' src/clients/config-export.ts || true

echo "--- ExportClientSpec/interface mentions in config-export.ts only ---"
rg -n -A8 -B6 'interface ExportClientSpec|type ExportClientSpec|filename:' src/clients/config-export.ts | sed -n '1,220p' || true

echo "--- export workflow references to client.filename / client.destination ---"
rg -n 'ClientSpec|filename|destination|download|exportClient|exportClients|EXPORT_CLIENTS' src tests --glob '!data/**' | sed -n '1,260p' || true

echo "--- invariant test excerpts mentioning filename/destination ---"
if [ -f tests/integrations-invariants.test.ts ]; then
  rg -n -C6 'filename|destination|integrations-invariant|export' tests/integrations-invariants.test.ts || true
else
  echo "tests/integrations-invariants.test.ts not found"
fi

Repository: lidge-jun/opencodex

Length of output: 48109


Align the OMP download filename with its canonical destination.

EXPORT_CLIENTS.omp.filename is "omp-models.yaml" at [src/clients/config-export.ts:1008], but ompModelsConfigPath() chooses [src/clients/config-export.ts:211-216] models.yml when no legacy models.yaml exists. The API response uses spec.filename as the downloaded file name, so users get omp-models.yaml instead of the file OMP reads by default. Rename the filename to the canonical destination, e.g. "models.yml".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/clients/config-export.ts` around lines 1006 - 1019, Update the filename
value in EXPORT_CLIENTS.omp to "models.yml" so downloaded OMP configurations
match the canonical path selected by ompModelsConfigPath. Keep the existing
destination and loopback-only behavior unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant